package com.ygqh.baby.utils;

import java.util.Comparator;

import com.ygqh.baby.model.ReturnSkuInfo;

/**
 * 按金额从小到大排序
 * 
 * @author admin
 *
 */
public class ReturnSkuInfoComparator implements Comparator<Object> {

	@Override
	public int compare(Object o1, Object o2) {
		ReturnSkuInfo detail1 = (ReturnSkuInfo) o1;
		ReturnSkuInfo detail2 = (ReturnSkuInfo) o2;
		if (detail1.getPrice().compareTo(detail2.getPrice()) > 0)
			return 1;
		else if (detail1.getPrice().compareTo(detail2.getPrice()) == 0)
			return 0;
		else
			return -1;
	}

}
